import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
export const asyncRouterMap = [
     {
         path: '/',
         name: 'layout',
         component: () => import('@/components/layout/layout'),
         meta: {  },
         redirect: '/home',
         children: [
             {
                 path: '/home',
                 name: 'home',
                 component: () => import('@/pages/home/home'),
                 meta: {title: '个人门户', permission: ['home'] }
             },
             {
                 path: '/reportForm',
                 name: 'reportForm',
                 component: () => import('@/pages/report/reportForm'),
                 meta: {title: '发起报备', permission: ['report'] }
             },
             {
                 path: '/reportList',
                 name: 'reportList',
                 component: () => import('@/pages/report/reportList'),
                 meta: {title: '报备管理', permission: ['report'] }
             },
             {
                 path: '/reportDetail',
                 name: 'reportDetail',
                 component: () => import('@/pages/report/reportDetail'),
                 meta: {title: '报备信息', permission: ['report'] }
             },
             {
                 path: '/projectForm',
                 name: 'projectForm',
                 component: () => import('@/pages/project/projectForm'),
                 meta: {title: '发起立项', permission: ['project'] }
             },
             {
                 path: '/projectList',
                 name: 'projectList',
                 component: () => import('@/pages/project/projectList'),
                 meta: {title: '项目列表', permission: ['project'] }
             },
             {
                 path: '/projectDetail',
                 name: 'projectDetail',
                 component: () => import('@/pages/project/projectDetail'),
                 meta: {title: '项目详情', permission: ['project'] }
             },
           
             {
                 path: '/serviceForm',
                 name: 'serviceForm',
                 component: () => import('@/pages/service/serviceForm'),
                 meta: {title: '创建服务商', permission: ['service'] }
             },
             {
                 path: '/serviceDetail',
                 name: 'serviceDetail',
                 component: () => import('@/pages/service/serviceDetail'),
                 meta: {title: '服务商详情', permission: ['service'] }
             },
             {
                 path: '/serviceList',
                 name: 'serviceList',
                 component: () => import('@/pages/service/serviceList'),
                 meta: {title: '服务商列表', permission: ['service'] }
             },
             {
                path: '/contractDetail',
                name: 'contractDetail',
                component: () => import('@/pages/contract/contractDetail'),
                meta: {title: '合同页', permission: ['contract'] }
            },
             {
                 path: '/contractForm',
                 name: 'contractForm',
                 component: () => import('@/pages/contract/contractForm'),
                 meta: {title: '合同立项', permission: ['contract'] }
             },
             {
                 path: '/contractList',
                 name: 'contractList',
                 component: () => import('@/pages/contract/contractList'),
                 meta: {title: '合同列表', permission: ['contract'] }
             }
         ]
     }
 ]

export const constantRouterMap = [
    {
        path: '/login',
        component: () => import('@/pages/home/home'),
    }
]
